/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * jFResposta.java
 *
 * Created on 11/09/2010, 13:08:46
 */

package teste_vocacional;


import teste_vocacional.classes.ClassConecta;
import teste_vocacional.classes.Alternativas;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Toolkit;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.prefs.Preferences;
import javax.swing.ButtonGroup;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JRadioButton;

/**
 *
 * @author LKFalcao
 */
public class jFResposta extends javax.swing.JFrame {

    int sequencia = 1;
    int codPergunta;
    int codAlternativa;
    int codParticipante;
    int quantPergunta;
    ResultSet rsP = null;//tabela pergunta
    ResultSet rsA = null;//tabela alternativa
    ResultSet rsAlternativa = null;//tabela alternativa
    JRadioButton oRadioButton = null;
    ButtonGroup oGrupo = null;

    
    
    /** Creates new form jFResposta */
    public jFResposta() {
        initComponents();
        this.getRootPane().setDefaultButton(iniciarjButton);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTextField4 = new javax.swing.JTextField();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        participantejTextField = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        emailjTextField = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        cidadejTextField = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        ufjTextField = new javax.swing.JTextField();
        telefonejFormattedTextField = new javax.swing.JFormattedTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        configurarjButton = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        perguntajLabel = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        fonteAlternativajLabel = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        participantejLabel = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        proximojButton = new javax.swing.JButton();
        concluirjButton = new javax.swing.JButton();
        proximaPerguntajButton = new javax.swing.JButton();
        iniciarjButton = new javax.swing.JButton();
        recomecarjButton = new javax.swing.JButton();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(teste_vocacional.Teste_vocacionalApp.class).getContext().getResourceMap(jFResposta.class);
        jTextField4.setText(resourceMap.getString("jTextField4.text")); // NOI18N
        jTextField4.setName("jTextField4"); // NOI18N

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setBackground(resourceMap.getColor("jPanel1.background")); // NOI18N
        jPanel1.setName("jPanel1"); // NOI18N

        jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        participantejTextField.setFont(resourceMap.getFont("participantejTextField.font")); // NOI18N
        participantejTextField.setForeground(resourceMap.getColor("participantejTextField.foreground")); // NOI18N
        participantejTextField.setText(resourceMap.getString("participantejTextField.text")); // NOI18N
        participantejTextField.setCaretColor(resourceMap.getColor("participantejTextField.caretColor")); // NOI18N
        participantejTextField.setMaximumSize(new java.awt.Dimension(166, 29));
        participantejTextField.setMinimumSize(new java.awt.Dimension(166, 29));
        participantejTextField.setName("participantejTextField"); // NOI18N
        participantejTextField.setSelectedTextColor(resourceMap.getColor("participantejTextField.selectedTextColor")); // NOI18N
        participantejTextField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                participantejTextFieldFocusLost(evt);
            }
        });

        jLabel2.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        emailjTextField.setFont(resourceMap.getFont("participantejTextField.font")); // NOI18N
        emailjTextField.setForeground(resourceMap.getColor("emailjTextField.foreground")); // NOI18N
        emailjTextField.setCaretColor(resourceMap.getColor("participantejTextField.caretColor")); // NOI18N
        emailjTextField.setMaximumSize(new java.awt.Dimension(166, 29));
        emailjTextField.setMinimumSize(new java.awt.Dimension(166, 29));
        emailjTextField.setName("emailjTextField"); // NOI18N
        emailjTextField.setSelectedTextColor(resourceMap.getColor("participantejTextField.selectedTextColor")); // NOI18N
        emailjTextField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                emailjTextFieldFocusLost(evt);
            }
        });

        jLabel3.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        cidadejTextField.setFont(resourceMap.getFont("participantejTextField.font")); // NOI18N
        cidadejTextField.setForeground(resourceMap.getColor("cidadejTextField.foreground")); // NOI18N
        cidadejTextField.setText(resourceMap.getString("cidadejTextField.text")); // NOI18N
        cidadejTextField.setCaretColor(resourceMap.getColor("participantejTextField.caretColor")); // NOI18N
        cidadejTextField.setMaximumSize(new java.awt.Dimension(166, 29));
        cidadejTextField.setMinimumSize(new java.awt.Dimension(166, 29));
        cidadejTextField.setName("cidadejTextField"); // NOI18N
        cidadejTextField.setSelectedTextColor(resourceMap.getColor("participantejTextField.selectedTextColor")); // NOI18N
        cidadejTextField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                cidadejTextFieldFocusLost(evt);
            }
        });

        jLabel4.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        ufjTextField.setFont(resourceMap.getFont("participantejTextField.font")); // NOI18N
        ufjTextField.setForeground(resourceMap.getColor("ufjTextField.foreground")); // NOI18N
        ufjTextField.setText(resourceMap.getString("ufjTextField.text")); // NOI18N
        ufjTextField.setCaretColor(resourceMap.getColor("participantejTextField.caretColor")); // NOI18N
        ufjTextField.setMaximumSize(new java.awt.Dimension(166, 29));
        ufjTextField.setMinimumSize(new java.awt.Dimension(166, 29));
        ufjTextField.setName("ufjTextField"); // NOI18N
        ufjTextField.setSelectedTextColor(resourceMap.getColor("participantejTextField.selectedTextColor")); // NOI18N
        ufjTextField.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                ufjTextFieldFocusLost(evt);
            }
        });
        ufjTextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                ufjTextFieldKeyReleased(evt);
            }
        });

        telefonejFormattedTextField.setForeground(resourceMap.getColor("telefonejFormattedTextField.foreground")); // NOI18N
        try {
            telefonejFormattedTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        telefonejFormattedTextField.setCaretColor(resourceMap.getColor("participantejTextField.caretColor")); // NOI18N
        telefonejFormattedTextField.setFont(resourceMap.getFont("telefonejFormattedTextField.font")); // NOI18N
        telefonejFormattedTextField.setMaximumSize(new java.awt.Dimension(166, 29));
        telefonejFormattedTextField.setMinimumSize(new java.awt.Dimension(166, 29));
        telefonejFormattedTextField.setName("telefonejFormattedTextField"); // NOI18N
        telefonejFormattedTextField.setSelectedTextColor(resourceMap.getColor("participantejTextField.selectedTextColor")); // NOI18N

        jLabel6.setIcon(resourceMap.getIcon("jLabel6.icon")); // NOI18N
        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel19.setFont(resourceMap.getFont("jLabel19.font")); // NOI18N
        jLabel19.setForeground(resourceMap.getColor("jLabel19.foreground")); // NOI18N
        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        jLabel20.setFont(resourceMap.getFont("jLabel19.font")); // NOI18N
        jLabel20.setForeground(resourceMap.getColor("jLabel19.foreground")); // NOI18N
        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N

        jLabel21.setFont(resourceMap.getFont("jLabel19.font")); // NOI18N
        jLabel21.setForeground(resourceMap.getColor("jLabel19.foreground")); // NOI18N
        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N
        jLabel21.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel21MouseClicked(evt);
            }
        });

        jLabel22.setFont(resourceMap.getFont("jLabel19.font")); // NOI18N
        jLabel22.setForeground(resourceMap.getColor("jLabel19.foreground")); // NOI18N
        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N

        jLabel23.setFont(resourceMap.getFont("jLabel19.font")); // NOI18N
        jLabel23.setForeground(resourceMap.getColor("jLabel19.foreground")); // NOI18N
        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        jLabel24.setFont(resourceMap.getFont("jLabel24.font")); // NOI18N
        jLabel24.setForeground(resourceMap.getColor("jLabel19.foreground")); // NOI18N
        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        configurarjButton.setText(resourceMap.getString("configurarjButton.text")); // NOI18N
        configurarjButton.setName("configurarjButton"); // NOI18N
        configurarjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                configurarjButtonActionPerformed(evt);
            }
        });

        jLabel8.setBackground(resourceMap.getColor("jLabel9.background")); // NOI18N
        jLabel8.setFont(resourceMap.getFont("jLabel9.font")); // NOI18N
        jLabel8.setForeground(resourceMap.getColor("jLabel9.foreground")); // NOI18N
        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jLabel9.setBackground(resourceMap.getColor("jLabel9.background")); // NOI18N
        jLabel9.setFont(resourceMap.getFont("jLabel9.font")); // NOI18N
        jLabel9.setForeground(resourceMap.getColor("jLabel9.foreground")); // NOI18N
        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel20)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(43, 43, 43)
                                .addComponent(jLabel19))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(25, 25, 25)
                                .addComponent(jLabel21))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(95, 95, 95)
                                .addComponent(jLabel22))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(55, 55, 55)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel23)
                                    .addComponent(jLabel24))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 447, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(26, 26, 26)
                        .addComponent(configurarjButton)
                        .addContainerGap())
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 252, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE)
                                .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(ufjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap())
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(telefonejFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(participantejTextField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(emailjTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE))
                                    .addComponent(cidadejTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE))
                                .addGap(194, 194, 194))))))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(222, 222, 222)
                .addComponent(jLabel8)
                .addContainerGap(204, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(254, 254, 254)
                .addComponent(jLabel9)
                .addContainerGap(316, Short.MAX_VALUE))
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2});

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {emailjTextField, participantejTextField, telefonejFormattedTextField});

        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel21)
                        .addGap(7, 7, 7)
                        .addComponent(jLabel24)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel22)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel23)
                        .addGap(19, 19, 19))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(configurarjButton)
                            .addComponent(jLabel6))))
                .addGap(63, 63, 63)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(participantejTextField, 0, 0, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(emailjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(cidadejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(ufjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(telefonejFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(51, 51, 51)
                .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9)
                .addGap(38, 38, 38))
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {cidadejTextField, emailjTextField, participantejTextField, telefonejFormattedTextField, ufjTextField});

        jLabel8.getAccessibleContext().setAccessibleName(resourceMap.getString("jLabel8.AccessibleContext.accessibleName")); // NOI18N

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        perguntajLabel.setFont(resourceMap.getFont("perguntajLabel.font")); // NOI18N
        perguntajLabel.setForeground(resourceMap.getColor("perguntajLabel.foreground")); // NOI18N
        perguntajLabel.setText(resourceMap.getString("perguntajLabel.text")); // NOI18N
        perguntajLabel.setName("perguntajLabel"); // NOI18N

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel3.border.title"), javax.swing.border.TitledBorder.LEADING, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel3.border.titleFont"), resourceMap.getColor("jPanel3.border.titleColor"))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 960, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 479, Short.MAX_VALUE)
        );

        fonteAlternativajLabel.setFont(resourceMap.getFont("fonteAlternativajLabel.font")); // NOI18N
        fonteAlternativajLabel.setForeground(resourceMap.getColor("fonteAlternativajLabel.foreground")); // NOI18N
        fonteAlternativajLabel.setText(resourceMap.getString("fonteAlternativajLabel.text")); // NOI18N
        fonteAlternativajLabel.setName("fonteAlternativajLabel"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(perguntajLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 884, Short.MAX_VALUE)
                        .addComponent(fonteAlternativajLabel)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(perguntajLabel)
                    .addComponent(fonteAlternativajLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        jPanel4.setName("jPanel4"); // NOI18N

        jLabel7.setFont(resourceMap.getFont("jLabel7.font")); // NOI18N
        jLabel7.setForeground(resourceMap.getColor("jLabel7.foreground")); // NOI18N
        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        participantejLabel.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        participantejLabel.setForeground(resourceMap.getColor("participantejLabel.foreground")); // NOI18N
        participantejLabel.setText(resourceMap.getString("participantejLabel.text")); // NOI18N
        participantejLabel.setName("participantejLabel"); // NOI18N

        jLabel11.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jLabel12.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jLabel13.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jLabel14.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jLabel15.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jLabel16.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jLabel17.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        jLabel18.setFont(resourceMap.getFont("jLabel18.font")); // NOI18N
        jLabel18.setForeground(resourceMap.getColor("jLabel18.foreground")); // NOI18N
        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGap(381, 381, 381)
                        .addComponent(jLabel7))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGap(81, 81, 81)
                                .addComponent(jLabel18))
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel4Layout.createSequentialGroup()
                                        .addGap(53, 53, 53)
                                        .addComponent(jLabel13))
                                    .addComponent(jLabel14))
                                .addComponent(jLabel12))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGap(175, 175, 175)
                                .addComponent(jLabel15))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGap(86, 86, 86)
                                .addComponent(jLabel16))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGap(191, 191, 191)
                                .addComponent(jLabel17))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGap(41, 41, 41)
                                .addComponent(jLabel11)))))
                .addContainerGap())
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(participantejLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 931, Short.MAX_VALUE)
                .addGap(37, 37, 37))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel7)
                .addGap(103, 103, 103)
                .addComponent(participantejLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel11)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel18)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel12)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel13)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel14)
                .addGap(18, 18, 18)
                .addComponent(jLabel15)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel17)
                .addGap(42, 42, 42))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel4.TabConstraints.tabTitle"), jPanel4); // NOI18N

        proximojButton.setFont(resourceMap.getFont("iniciarjButton.font")); // NOI18N
        proximojButton.setText(resourceMap.getString("proximojButton.text")); // NOI18N
        proximojButton.setName("proximojButton"); // NOI18N
        proximojButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                proximojButtonActionPerformed(evt);
            }
        });

        concluirjButton.setFont(resourceMap.getFont("iniciarjButton.font")); // NOI18N
        concluirjButton.setText(resourceMap.getString("concluirjButton.text")); // NOI18N
        concluirjButton.setName("concluirjButton"); // NOI18N
        concluirjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                concluirjButtonActionPerformed(evt);
            }
        });

        proximaPerguntajButton.setFont(resourceMap.getFont("iniciarjButton.font")); // NOI18N
        proximaPerguntajButton.setText(resourceMap.getString("proximaPerguntajButton.text")); // NOI18N
        proximaPerguntajButton.setName("proximaPerguntajButton"); // NOI18N
        proximaPerguntajButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                proximaPerguntajButtonActionPerformed(evt);
            }
        });

        iniciarjButton.setFont(resourceMap.getFont("iniciarjButton.font")); // NOI18N
        iniciarjButton.setText(resourceMap.getString("iniciarjButton.text")); // NOI18N
        iniciarjButton.setName("iniciarjButton"); // NOI18N
        iniciarjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                iniciarjButtonActionPerformed(evt);
            }
        });

        recomecarjButton.setFont(resourceMap.getFont("iniciarjButton.font")); // NOI18N
        recomecarjButton.setText(resourceMap.getString("recomecarjButton.text")); // NOI18N
        recomecarjButton.setName("recomecarjButton"); // NOI18N
        recomecarjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                recomecarjButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(iniciarjButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(proximaPerguntajButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(proximojButton, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(94, 94, 94)
                        .addComponent(concluirjButton)
                        .addGap(111, 111, 111)
                        .addComponent(recomecarjButton))
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 997, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 578, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(iniciarjButton)
                    .addComponent(proximojButton)
                    .addComponent(proximaPerguntajButton)
                    .addComponent(recomecarjButton)
                    .addComponent(concluirjButton))
                .addContainerGap(23, Short.MAX_VALUE))
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {concluirjButton, proximojButton, recomecarjButton});

        pack();
    }// </editor-fold>//GEN-END:initComponents

    

    private void proximojButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_proximojButtonActionPerformed
        try {
//            if ( !oGrupo.getSelection().isSelected()){
//            JOptionPane.showMessageDialog(null, "Por favor,selecione uma opção!","Atenção!",JOptionPane.WARNING_MESSAGE);
//            return;
//            }
            // TODO add your handling code here:
            //Declarar variavel publica chamada codAlternativa do tipo int
            //Criar um objeto da classe Alternativas
            Alternativas oAlternativa = new Alternativas();
            //Definir dois atributos, codPergunta e alternativa =  oGrupo.getSelection().getActionCommand()
            oAlternativa.setAlternativa(oGrupo.getSelection().getActionCommand());
            //Declarar uma variavel rsAlternativa do tipo ResultSet recebendo o getConsultar() do objeto oAlternativa

            rsAlternativa = oAlternativa.getConsultar();
            rsAlternativa.first();
            //Atribuir valor a variavel codAlternativa = rsAlternativa.getInt("codAlternativa")
            codAlternativa = rsAlternativa.getInt("codAlternativa");
            //Criar objeto para a classe Respostas chamado oResposta
            Respostas oResposta = new Respostas();
            //Instanciar todos os campos possíveis.
            oResposta.setCodAlternativa(codAlternativa);
            oResposta.setCodPergunta(codPergunta);
            oResposta.setCodParticipante(codParticipante);
            //Executar o metodo setCadastrar()
            oResposta.setCadastrar();
            proximaPerguntajButtonActionPerformed(null);
        } catch (SQLException ex) {
            Logger.getLogger(jFResposta.class.getName()).log(Level.SEVERE, null, ex);
        }


    }//GEN-LAST:event_proximojButtonActionPerformed

    private void proximaPerguntajButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_proximaPerguntajButtonActionPerformed
        try {
//                if (   sequencia == (quantPergunta + 1)   ){
//                //ocultar botões menos concluir
//                proximojButton.setVisible(false);
//                iniciarjButton.setVisible(false);
//                concluirjButton.setVisible(true);
//
//                return;
//            }else

                if ( sequencia == quantPergunta){
                proximojButton.setVisible(false);
                concluirjButton.setVisible(true);
            }


            jPanel3.removeAll();
            oGrupo = new ButtonGroup();

            // TODO add your handling code here:
            Perguntas oPergunta = new Perguntas();
            oPergunta.setSequencia(sequencia);
            rsP = oPergunta.getConsultar();
            rsP.first();
            codPergunta = rsP.getInt("codPergunta");


            perguntajLabel.setFont(perguntajLabel.getFont());
            perguntajLabel.setText(sequencia+") "+ rsP.getString("pergunta") );

            //Consultar alternativas da pergunta acima
            Alternativas oAlternativa = new Alternativas();
            oAlternativa.setCodPergunta(codPergunta);
            rsA = oAlternativa.getConsultar();
            rsA.next();
            rsA.beforeFirst();
            while (rsA.next()){
              oRadioButton = new JRadioButton( rsA.getString("letra")+" "+rsA.getString("alternativa")  ,false);
              oRadioButton.setFont(fonteAlternativajLabel.getFont());
              oRadioButton.setForeground(fonteAlternativajLabel.getForeground());
              oRadioButton.setActionCommand(null);
              oRadioButton.setActionCommand( rsA.getString("alternativa")  );
              oRadioButton.setLabel(rsA.getString("alternativa"));
              oGrupo.add(oRadioButton);

              jPanel3.setLayout( new GridLayout(7,2) );
              jPanel3.add(oRadioButton);
              jPanel3.revalidate();
              jPanel3.repaint();
            }
            sequencia++;
        } catch (SQLException ex) {
            Logger.getLogger(jFResposta.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_proximaPerguntajButtonActionPerformed

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
         //Guardar preferencia de dominio
        fonteAlternativajLabel.setVisible(false);
        Preferences prefs = Preferences.userRoot().node(""); //this.getClass().getName()
        //Definir classe conecta
        ClassConecta.url                = "jdbc:mysql://"+ prefs.get("ipMySQL", "127.0.0.1") +":"+ prefs.get("portaMySQL", "3306") +"/"+prefs.get("bancoMySQL", "apolo");
        ClassConecta.user               = prefs.get("usuarioMySQL", "root");
        ClassConecta.pwd                = prefs.get("senhaMySQL", "" );

        //Definindo o Tamanho do Padrão do Formulario de Acordo com Tamanho da Tela
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        //frame.setMinimumSize(new Dimension(800, 600));
        this.setMinimumSize(new Dimension((screenSize.width - 50), (screenSize.height - 100)));
        //frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
        //Quando restaurar nãõ va para o canto direito e sim para o esquerdo.
        this.setLocation(10, 10);
        this.setExtendedState(JFrame.MAXIMIZED_BOTH);
        
        jTabbedPane1.setEnabledAt(1, false);
        jTabbedPane1.setEnabledAt(2, false);
        participantejTextField.grabFocus();
        proximaPerguntajButton.setVisible(false);
        proximojButton.setVisible(false);
        concluirjButton.setVisible(false);
        recomecarjButton.setVisible(false);
      
            // TODO add your handling code here:
            ClassConecta oConexao = new ClassConecta();
            oConexao.conecta();
       
    }//GEN-LAST:event_formWindowOpened

    private void iniciarjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_iniciarjButtonActionPerformed
        try {
            // TODO add your handling code here:
            if ((participantejTextField.getText().equals("")) || (emailjTextField.getText().equals(""))){
            JOptionPane.showMessageDialog(null, "Por favor, confira todos os campos!","Atenção!",JOptionPane.WARNING_MESSAGE);
            return;
            }else if(ufjTextField.getText().length() > 2){
            JOptionPane.showMessageDialog(null, "O campo UF não pode ter mais de 2 (dois) caracteres","Atenção!",JOptionPane.WARNING_MESSAGE);
            return;    
            }
            else{
                
            Participantes oParticipante = new Participantes();
            oParticipante.setParticipante(participantejTextField.getText());
            oParticipante.setCidade(cidadejTextField.getText());
            oParticipante.setEmail(emailjTextField.getText());
            oParticipante.setTel(telefonejFormattedTextField.getText());
            oParticipante.setUf(ufjTextField.getText());
            oParticipante.setCadastrar();

            //Pegar quantidade de pergunta
            Perguntas oPergunta = new Perguntas();
            quantPergunta = oPergunta.getQuantidadeTotalResposta();

            codParticipante = oParticipante.getId();
            jTabbedPane1.setSelectedIndex(1);
            proximaPerguntajButtonActionPerformed(null);

            jTabbedPane1.setEnabledAt(1, true);
            jTabbedPane1.setEnabledAt(0, false);

            proximojButton.setVisible(true);
            iniciarjButton.setVisible(false);
            concluirjButton.setVisible(false);
            }

        } catch (SQLException ex) {
            iniciarjButton.setVisible(true);
            Logger.getLogger(jFResposta.class.getName()).log(Level.SEVERE, null, ex);
        }

    }//GEN-LAST:event_iniciarjButtonActionPerformed

    private void concluirjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_concluirjButtonActionPerformed

        try {
            if ( sequencia == quantPergunta){
                proximojButtonActionPerformed(null);
            }
            
            jTabbedPane1.setEnabledAt(2, true);
            jTabbedPane1.setSelectedIndex(2);
            iniciarjButton.setVisible(false);
            proximaPerguntajButton.setVisible(false);
            proximojButton.setVisible(false);
            recomecarjButton.setVisible(true);
            Respostas oResposta = new Respostas();
            participantejLabel.setText(  oResposta.getTabular(codParticipante) );
            
            //Limpar variaveis publicas
            sequencia = 1;
            codPergunta = 0;
            codAlternativa = 0;
            codParticipante= 0;
            quantPergunta= 0;
            rsP = null;//tabela pergunta
            rsA = null;//tabela alternativa
            rsAlternativa = null;//tabela alternativa
            oRadioButton = null;
            oGrupo = null;
            jTabbedPane1.setEnabledAt(1, false); //Desabilita a aba 1(pergunta)
            concluirjButton.setVisible(false);
            try {
                // TODO add your handling code here:
                ClassConecta.con.commit();
                ClassConecta.con.setAutoCommit(false);
            } catch (SQLException ex) {
                Logger.getLogger(jFResposta.class.getName()).log(Level.SEVERE, null, ex);
            }
        } catch (SQLException ex) {
            Logger.getLogger(jFResposta.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_concluirjButtonActionPerformed

    private void recomecarjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_recomecarjButtonActionPerformed
        // TODO add your handling code here:
        
        iniciarjButton.setVisible(true);
        jTabbedPane1.setEnabledAt(1, false);
        jTabbedPane1.setEnabledAt(2, false);
        jTabbedPane1.setEnabledAt(0, true);
        jTabbedPane1.setSelectedIndex(0);
        Funcoes.limpaCampos(jPanel1);
        recomecarjButton.setVisible(false);
        concluirjButton.setVisible(false);
        participantejTextField.grabFocus();

    }//GEN-LAST:event_recomecarjButtonActionPerformed

    private void participantejTextFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_participantejTextFieldFocusLost
        // TODO add your handling code here:
        participantejTextField.setText( participantejTextField.getText().toUpperCase()  );
    }//GEN-LAST:event_participantejTextFieldFocusLost

    private void emailjTextFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_emailjTextFieldFocusLost
        // TODO add your handling code here:
        emailjTextField.setText( emailjTextField.getText().toUpperCase()  );
    }//GEN-LAST:event_emailjTextFieldFocusLost

    private void cidadejTextFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_cidadejTextFieldFocusLost
        // TODO add your handling code here:
        cidadejTextField.setText( cidadejTextField.getText().toUpperCase()  );
    }//GEN-LAST:event_cidadejTextFieldFocusLost

    private void ufjTextFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_ufjTextFieldFocusLost
        // TODO add your handling code here:
        ufjTextField.setText( ufjTextField.getText().toUpperCase()  );
    }//GEN-LAST:event_ufjTextFieldFocusLost

    private void jLabel21MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel21MouseClicked
        // TODO add your handling code here:

    }//GEN-LAST:event_jLabel21MouseClicked

    private void configurarjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configurarjButtonActionPerformed
        // TODO add your handling code here:
        jFConexao oFormConexao = new jFConexao();
        oFormConexao.pack();
        oFormConexao.setVisible(true);
    }//GEN-LAST:event_configurarjButtonActionPerformed

    private void ufjTextFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_ufjTextFieldKeyReleased
        // TODO add your handling code here:
        if (ufjTextField.getText().length() > 1){
            telefonejFormattedTextField.grabFocus();
        }

    }//GEN-LAST:event_ufjTextFieldKeyReleased

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new jFResposta().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField cidadejTextField;
    private javax.swing.JButton concluirjButton;
    private javax.swing.JButton configurarjButton;
    private javax.swing.JTextField emailjTextField;
    private javax.swing.JLabel fonteAlternativajLabel;
    private javax.swing.JButton iniciarjButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JLabel participantejLabel;
    private javax.swing.JTextField participantejTextField;
    private javax.swing.JLabel perguntajLabel;
    private javax.swing.JButton proximaPerguntajButton;
    private javax.swing.JButton proximojButton;
    private javax.swing.JButton recomecarjButton;
    private javax.swing.JFormattedTextField telefonejFormattedTextField;
    private javax.swing.JTextField ufjTextField;
    // End of variables declaration//GEN-END:variables

}
